pub mod config {
    use macros::base_model;
    use sea_orm::entity::prelude::*;
    use serde::{Deserialize, Serialize};

    #[base_model]
    #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
    #[sea_orm(table_name = "ai_config", comment = "AI配置表")]
    pub struct Model {
        #[sea_orm(column_type = "Text", not_null, comment = "调用地址")]
        pub base_url: String,

        #[sea_orm(column_type = "Text", nullable, comment = "调用凭证")]
        pub api_key: Option<String>,

        #[sea_orm(column_type = "Double", nullable, comment = "温度参数")]
        pub temperature: Option<Decimal>,

        #[sea_orm(column_type = "Double", nullable, comment = "p参数")]
        pub top_p: Option<Decimal>,

        #[sea_orm(column_type = "Text", not_null, comment = "模型名称")]
        pub model: String,

        #[sea_orm(column_type = "Text", not_null, comment = "AI类型(local/remote)")]
        pub kind: String,

        #[sea_orm(column_type = "Integer", nullable, comment = "是否当前使用中")]
        pub current_use: Option<i32>,

        #[sea_orm(column_type = "Text", not_null, comment = "配置名称")]
        pub name: String,
    }

    #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
    pub enum Relation {}
}
